// Task.cpp : 任务执行
//

#include "ThreadPool.h"

void Task::exec()
{
	if (result_ptr_ != nullptr)
		result_ptr_->setValue(this->run());
}

void Task::setResult(Result* res)
{
	result_ptr_ = res;
}